<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app"></div>

  <template id="my-app">
    <h2 v-if="score>=90">大于等于90</h2>
    <!-- <h2 v-else-if="score<80">小于80</h2> -->
    <h3 v-else style="display:none;"></h3>

    <input type="text" placeholder="请输入数字" @keyup.enter="change">
  </template>
  <script src="./assets/js/vue.js"></script>
  <script>
    const app = Vue.createApp({
      template: '#my-app',
      data() {
        return {
          score: 0
        }
      },
      methods: {
        change(e) {
          this.score = e.target.value
          if (this.score < 90) {
            document.querySelector('h3').style.display = ''
            document.querySelector('h3').innerHTML = '哈哈'
          }
        }
      }
    })
    app.mount("#app")
  </script>
</body>

</html>